﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WindowsFormsView;

namespace WindowsFormsPresenter.Restaurant
{
    public class RestaurantsPresenter : Presenter<IRestaurantsView>
    {
        public RestaurantsPresenter(IRestaurantsView view)
            : base(view)
        {
        }

        public void Display()
        {
            View.Restaurants = Model.GetRestaurants();
        }

        public int GetTotalPage()
        {
            return Model.GetTotalPageFromRestaurant();
        }

        public void DisplayByPage(int currentPage)
        {
            View.Restaurants = Model.GetRestaurantsByPage(currentPage);
        }
    }
}
